package com.foreveross.mofang.datapersistence.infra;

/**
 * 数据库类型
 * 
 * @author fb
 */
public enum DBType {
	HBASE("HBase"), 
	MYSQL("MySql"), 
	ORACLE("Oracle"), 
	SQLSERVER("SqlServer"), 
	MONGODB("Mongodb"),
	NULL("NULL");

	private String lable;

	DBType(String lable) {
		this.lable = lable;
	}
	
	public static DBType getDBTypeByLable(String lable) {
		 for (DBType type : DBType.values()) {
			 if (type.getLable().equalsIgnoreCase(lable)) {
				 return type;
			 }
		 }
		
		return NULL;
	}

	public String getLable() {
		return lable;
	}

	public void setLable(String lable) {
		this.lable = lable;
	}
}
